Electric motor control for pumpjack pumping

ABSTRACT

A pumpjack is driven by an electric motor coupled to a gear box. A local drive controller controls the motor in accordance with a varying motor speed profile over a pumping cycle of the pumpjack. The drive controller determines, based on sensory feedback from the one or more sensors, a pumping cycle load profile, automatically determines, based on the pumping cycle load profile, a varying voltage profile, and controls the motor in accordance with the varying motor speed profile while applying the varying voltage profile to the motor.

TECHNICAL FIELD

This specification generally relates to controlling an electric motor topump fluid in a pumpjack.

BACKGROUND

Reciprocating oil pumps are traditionally provided in the form of abeam-balanced pumpjack unit. Conventional pumpjacks provide a sinusoidalcharacteristic of reciprocating pumping motion dictated by its geometryand the fixed speed of its prime mover. Other types of pumping units,such as long stroke or hydraulically actuated pumping units, operate ata first constant speed during upstroke motion and at a second constantspeed during downstroke motion. Traditional pumping units employ a fixedspeed electric motor as the prime mover and develop a desired speedprofile by design of the mechanical linkage between motor and pump rod,while some modern units feature a variable frequency drive (VFD) thatvaries drive speeds for various portions of the pumping cycle to providea desired pumping speed profile.

SUMMARY

This specification describes technologies related to systems and methodsfor pumpjack fluid pumping.

One aspect of the invention features a pumpjack motor system, includingan electric motor coupled to a gear box of a pumpjack, one or moresensors mounted to monitor at least one operating condition of thepumpjack during operation of the motor, and a drive controller coupledto the motor and operable to control the motor in accordance with avarying motor speed profile over a pumping cycle of the pumpjack, whileapplying voltage to the motor. The drive controller is configured todetermine, based on sensory feedback from the one or more sensors, apumping cycle load profile, to automatically determine, based on thepumping cycle load profile, a varying voltage profile, and to controlthe motor in accordance with the varying motor speed profile whileapplying the varying voltage profile to the motor.

In some situations, the varying motor speed profile is an alteredversion of a stroke timing curve implemented during one or more previouspumping cycles of the pumpjack. In some cases, the varying motor speedprofile includes a plurality of target motor speeds corresponding toeach of a plurality of discrete control periods within the pumping cycleof the pump jack.

In some examples, the pumping cycle load profile includes a plurality oftorque loads corresponding to each of the plurality of discrete controlperiods.

Preferably, the plurality of discrete control periods of the first pumpstroke cycle includes at least 100 control periods. One or more of theplurality of discrete control periods of the first pump stroke cycle mayhave a time duration of between about 5 and 100 milliseconds.

In some examples, the drive controller is configured to determine thepumping cycle load profile as a mathematical prediction based onhistorical sensory feedback provided by the one or more sensors duringone or more previous pumping cycles of the pumpjack, and/or adjustmentsbetween the varying motor speed profile and a stroke timing curveimplemented during one or more previous pumping cycles of the pumpjack.

In some embodiments, at least one of the sensors is a load sensor, suchas a load cell responsive to load of a polish rod of the pumpjack. Insome examples, at least one of the sensors is a crank rotation sensor,or a motor shaft position sensor, or a motor current sensor.

Another aspect of the invention features a method of operating apumpjack, including operating an electric motor driving the pumpjackaccording to a varying motor speed profile during a first pump strokecycle of the pumpjack (the motor speed profile including a plurality oftarget motor speeds corresponding to each of a plurality of discretecontrol periods), receiving sensory feedback from one or more sensorsmounted to monitor at least one operating condition of the pumpjack (thesensory feedback including data collected during the first pump strokecycle), determining a pump cycle load profile based on the sensoryfeedback (the pump cycle load profile corresponding to a plurality oftorque loads of the electric motor at each of the discrete controlperiods of the first pump stroke cycle), automatically determining,based on the pump cycle load profile, a varying voltage profile, andthen operating the electric motor according to the varying motor speedprofile and the varying voltage profile during a second pump strokecycle of the pumpjack.

Various examples of the method according to this aspect of the inventioninclude one or more features discussed above with respect to the firstaspect.

Various examples of methods or systems corresponding to one or more ofthe described aspects of the invention discussed herein mayadvantageously provide improved fluid production rate of a pumpjackunit, and/or improved pumping efficiency, by implementing optimizationtechniques designed to increase the pumping rate, pump efficiency and/orpump stroke length by automatically adjusting the pumping speedthroughout the pump stroke cycle, in response to local conditions.Further, the efficiency of the electric motor serving as the prime moverof the pumpjack can be improved by employing a voltage patterncommensurate with required torque levels of the adjusted/optimized motorspeed pattern. These techniques may be implemented automatically (e.g.,without user interaction) by a local controller, without employingcomputationally complex mathematical simulations. Speed adjustments maytherefore be implemented in essentially real time (e.g., in response tochanging downhole conditions) and without interruption of the pumpingprocess.

The details of one or more implementations of the subject matterdescribed in this specification are set forth in the accompanyingdrawings and the description below. Other features, aspects, andadvantages of the subject matter will become apparent from thedescription, the drawings, and the claims.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic view of a pumpjack in accordance with one or moreembodiments of the present disclosure.

FIG. 2 is a graph illustrating a default stroke cycle compared to anadjusted stroke cycle.

FIG. 3 is diagram illustrating the modification of a default motor speedprofile to provide an adjusted motor speed profile.

FIG. 4 is a graph illustrating a technique of operating a pumpjack thatincludes monitoring a surface dynamometer card and a downhole pump cardto detect a pump-off condition.

FIG. 5 is a graph illustrating a technique of operating a pumpjack thatincludes monitoring a surface dynamometer card to detect a rod binding.

FIG. 6 is a graph illustrating a technique of operating a pumpjack thatincludes monitoring a surface dynamometer card to detect a rod stresslimit.

FIG. 7 is a graph illustrating a technique of operating a pumpjack thatincludes monitoring a surface dynamometer card to detect a gearboxtorque limit

FIG. 8 is a graph illustrating the progressive modification of apumpjack stroke cycle in response to varying motor speeds.

FIGS. 9A-9E are graphs illustrating the progressive modification ofpumpjack stroke cycle according to an iterative tuning process.

FIG. 10 is a flow chart illustrating a first method of operating apumpjack in accordance with one or more embodiments of the presentdisclosure.

FIG. 11 is a flow chart illustrating a second method of operating apumpjack in accordance with one or more embodiments of the presentdisclosure.

FIG. 12 is a flow chart illustrating a third method of operating apumpjack in accordance with one or more embodiments of the presentdisclosure.

FIG. 13 is a graph illustrating a varying voltage profile determinedbased on a varying motor torque profile.

FIG. 14 is a flow chart illustrating a fourth method of operating apumpjack in accordance with one or more embodiments of the presentdisclosure.

FIG. 15 is a graph illustrating a technique of operating a pumpjack thatincludes monitoring a surface dynamometer card and altering the stroketiming of the motor to increase fluid production while avoiding gearboxtorque limits.

Many of the features are exaggerated to better show the features,process steps, and results.

DETAILED DESCRIPTION

One or more implementations of the present disclosure include pumpjacksand pumpjack motor systems, as well as techniques for operating thesame, where the controller facilitates tuning and adaptation of thestroke timing by dynamically (e.g., on a stroke cycle interval basis)adjusting motor RPM to optimize a broad set of configurable parameters,including overall system efficiency and various stress conditions. Insome examples, the controller can be implemented by a moderately capablelocal processor, so as to avoid exceedingly complex mathematicalcomputations that may delay adjustment of the stroke timing. In someexamples, the controller utilizes a combination of mathematicallypredictive and partially predictive empirical (e.g., Perturb-now andObserve-later) algorithms for dynamic stroke-timing modification.

Referring first to FIG. 1, a pumpjack 100 includes a frame 102(sometimes referred to as a “Sampson post”), a walking beam 104, ahorsehead 106, a polish rod 108, and a pump 110. The frame 102 issupported on a substantially flat base 112. The walking beam 104 ispivotally coupled (e.g., journaled) to the crest of the frame 102. Thehorsehead 106 is coupled to a front end of the walking beam 104, andtherefore moves vertically upward and downward as the walking beam 104pivots about the frame 102. The polish rod 108 is coupled to thehorsehead 106 by a cable 114 (sometimes referred to as a “bridal”) andextends downward therefrom to project into the wellbore 10. The curvedface of the horsehead 106 ensures that the polish rod 108 is lowered andraised in a straight line. The pump 110 is located towards the bottom ofthe wellbore 10, coupled to the polish rod 108 by an intervening suckerrod 116. Although depicted in FIG. 1 as a single component, the suckerrod 116 may be provided as a string of multiple rod segments coupled toone another in an end-to-end arrangement. In some embodiments, the pump110 includes two valves and a plunger contained within a tubular pumpbarrel. During the “upstroke” of the pump—that is, when the plunger ispulled upward by the sucker rod 116—the top valve (sometimes referred toas the “riding valve”) closes and the bottom valve (sometimes referredto as the “standing valve”) opens. Fluid in the portion of the pumpbarrel above the riding valve is drawn upward with the plunger, and thebottom portion of the pump barrel is simultaneously filled with fluidthat enters the bottom of the wellbore 10 via perforations that havemade through the surrounding casing. During the “downstroke” of the pump110—that is, when the plunger is pushed downward by the sucker rod116—the riding valve opens and the standing valve closes, which allowsfluid from the bottom portion of the pump barrel to flow through theriding valve. An upstroke-downstroke pair is referred to as a “strokecycle.”

The rod system (e.g., the polish rod 108 and the sucker rod 116) carriesa continuously varying load due to the reciprocating motion of thehorsehead 106 and the associated fluid movement of the pump 110. Themaximum load occurs shortly after the beginning of the upstroke, whenthe riding valve closes. The polish rod 108 must carry the full weightof the fluids, the rod system, and the added inertial effects that occuras the motion of the rods is reversed. The minimum load occurs shortlyafter the beginning of the downstroke, as the riding valve opens. Atthat point, the rod system no longer carries the fluid load and theinertial effects are reversed, thereby reducing the total rod load belowthe weight of the rods and the produced fluids. The rod systemcontinuously stretches and contracts in response to the varying load. Inaddition, because of the elasticity of the sucker rod 116, which isusually of substantial length (e.g., over 5,000 ft.), large stress wavesrun up and down the rod in response to the various applied forces (e.g.,the above described loads, as well as mechanical and fluid friction).These stress waves may cause the sucker rod 116 to break if they becomeexcessive.

The walking beam 104 is driven by powertrain assembly including a primemover 118, a reduction gearbox 120, and a piloting shaft 122 (sometimesreferred to as a “Pitman arm”). The prime mover 118 drives the gearbox120 through a belt system (not shown). The gearbox 120 imparts rotarymotion into the proximal end of the piloting shaft 122 via a rotatingcrank 123. The distal end of the piloting shaft 122 is coupled to a rearend of the walking beam 104, and rocks the walking beam 104 back andforth in a pivoting motion about the frame 102, thus moving thehorsehead 106 up and down as described above. In this example, the freeend of the rotating crank 123 carries a counterweight 124, which atleast partially offsets the weight of the rods (e.g., the polish rod 108and sucker rod 116) and fluid to assist the prime mover 118 during theupstroke of the pump 110, and provides substantial resistance againstthe prime mover 118 to inhibit freefall of the rod system and pump 110during the downstroke.

In this example, the prime mover 118 is provided in the form of anelectrical induction motor (e.g., a high efficiency Nema B motor)operated by a variable frequency drive (“VFD”) 126. The VFD 126regulates the speed and torque output of the prime mover 118 by varyinginput frequency and voltage. In some embodiments, the VFD 126 includesappropriate hardware and circuitry (e.g., processors, memory, and I/Ocomponents) to regulate the speed and torque output based on one or moresetpoint values. A controller 128 communicatively coupled to the VFD 126includes appropriate hardware and circuitry (e.g., processors, memory,and I/O components) so as to achieve any of the control operationsdescribed herein. For example, the controller 128 may be configured toprovide a target motor speed and/or a target motor torque setpoint tothe VFD 126. In some implementations, the controller 128 may beimplemented locally with the VFD 126 (e.g., fully or partiallyintegrated therewith) or located at a remote location with communicationbetween the components being conducted across a wired or wireless link(e.g., wired radio, the Internet, wireless cellular network, telephonenetwork or satellite communication). In some examples, the prime mover118 is further equipped with a regenerative drive provided for the dualpurpose of providing a braking (or negative) torque to control thedescent of the rod system and simultaneously converting the kineticenergy of the downward moving rod system into electrical power. Thus,the pumpjack is able to recapture at least a portion of its power drawfrom the grid as it operates according to the various tuning andmonitoring techniques described in the present disclosure.

One or more aspects of the present disclosure are based on a realizationthat the timing of the stroke cycle of the pump 110 can be dynamicallyadjusted via the controller 128 without physically altering the pumpjackcomponents discussed above (e.g., the gearbox 120, the piloting shaft122, and the crank 123). For example, the controller 128 can provide amotor speed profile to the VFD 126 that includes a plurality of varyingtarget motor speeds corresponding to each of a plurality of discretecontrol periods within a pump stroke cycle. In some embodiments, themotor speed profile may be determined by the controller 128 so as toimprove the production of fluid from the pump 110. In some embodiments,the motor speed profile may be determined by the controller 128 so as tomitigate or decrease the risk of pump-off (a condition where the lowerportion of the pump barrel is not filled with fluid during the upstroke,causing the plunger to pound into the fluid during the downstroke, whichsends a damaging shockwave through the rod system), high stress orfatigue load limits in the rod system (e.g., the polish and suckerrods), and/or high torque in the gearbox.

In some embodiments, the controller 128 determines an appropriate motorspeed profile in response to feedback received during a previous strokecycle of the pump 110 from one or more sensors distributed across thepumpjack 100. In this example, the pumpjack 100 includes a load cellsensor 130, a crank rotation sensor 132, and a motor shaft positionsensor 134 (each of which is depicted schematically in FIG. 1). The loadcell sensor 130 (e.g., a strain gauge) provides a feedback signalproportional to the load carried by the polish rod 108. The crankrotation sensor 132 provides a feedback signal corresponding to theangular position of the crank 123 coupling the gearbox 120 to thepiloting shaft 122. In some embodiments, the crank rotation sensor 132includes a traveling magnet attached to the counterweight 124 carried bythe crank 123 and a stationary transducer mounted to the gearbox 120 orthe base 112. The transducer is responsive to the lines of magnetic fluxeffected by the traveling magnet, so that a signal is generated at eachfull 360° rotation of the counterweight 124.

FIG. 2 illustrates a graph 200 plotting polish rod position versus timeillustrates a default stroke timing curve 202 and an adjusted stroketiming curve 204. The polish rod position data may be captured directlyby a polish rod displacement sensor, or calculated based on feedbackfrom the motor shaft position sensor 134 for the given geometry of thegearbox 120, crank 123 and other pumpjack components. The default stroketiming curve 202 is representative of a pumpjack where the prime moveris operated at constant speed. The default stroke timing curve 202resembles a sinusoidal wave pattern, exhibiting a smooth repetitiveoscillation between the upstroke and the downstroke, which are equal induration. The adjusted stroke timing curve 204 is a modified version ofthe default stroke timing curve 202, and is representative of a pumpjackin accordance with one or more embodiments of the present disclosure,where the prime mover is controlled according to a motor speed profileincluding a plurality of varying target motor speeds within the strokecycle. In this example, the adjusted stroke timing curve 204demonstrates that that the prime mover is slowed down during theupstroke and sped up during the downstroke. As illustrated in the graph200, the result, relative to the default stroke timing curve 202, is anincreased upstroke time and a decreased downstroke time. The increasedupstroke time increases the volumetric efficiency of the pump, becausethere is more time for the pump barrel to refill with fluid from thereservoir. Furthermore, slowing the prime mover, and therefore the pumpplunger, during the upstroke may also increase the stroke length of thepump by allowing the elastic sucker rod to recover from stretchingduring the downstroke and potentially contract near the top of theupstroke. The amount of time added to the upstroke is compensated for bythe decreased downstroke time.

As illustrated in the graph 200, the adjusted stroke timing curve 204has the same duration as the default stroke timing curve 202. Thus, theadjusted stroke timing curve 204 provides an increase in pumpingefficiency without affecting the overall “pumping rate” (by “pumpingrate” we refer to the number of pump stroke cycles executed in a giventime period—e.g., strokes per minute (SPM)). The increase in pumpefficiency and pump stroke length combined with a constant pumping rateresults in an increased fluid production rate. The fluid production rateis typically measured in units of barrels of fluid per day (BFPD). Insome embodiments, such as described below, the downstroke time may beeven further decreased to increase the pumping rate relative to thedefault stroke timing curve and further increase the fluid productionrate.

Referring next to FIG. 3, a sequential diagram 300 (illustratedgraphically at FIGS. 9A-9C) demonstrates that a default motor speedprofile 302 can be adapted by a motor speed adjustment table 304 toprovide an adjusted motor speed profile 306. As described above, a motorspeed profile includes a plurality of target motor speeds correspondingto each of a plurality of discrete control periods within a pump strokecycle. In this example, the motor speed profiles include one-hundredcontrol periods, each of which represents between about 5 and 100milliseconds (e.g., between about 10 and 70 milliseconds, such as about30 milliseconds or about 50 milliseconds) of the stroke cycle. However,other suitable configurations are also envisioned within the scope ofthe present disclosure (e.g., the number of control periods per cyclemay be greater than or less than one-hundred, the number of controlperiods and/or the time duration of each control period may vary betweencycles, etc.). The default motor speed profile 302 is representative ofa pumpjack where the prime mover that is operated at constant speed ofabout 1,100 RPM. Thus, the target motor speed for each of the controlperiods of the default motor speed profile 302 is set to 1,100 RPM. Incontrast to the default motor speed profile 302, the adjusted motorspeed profile 306 includes a varying array of target motor speeds,ranging from 1,060 RPM to 1,170 RPM, distributed over the respectiveone-hundred control periods. The varying target motor speeds of theadjusted motor speed profile 306 are determined by modifying the defaultmotor speed profile 302 according to the RPM adjustment values of themotor speed adjustment table 304. In this example, the RPM adjustmentvalues are provided in the form of an array of increment (e.g., +0 to70), decrement (e.g., −0 to −40) and null or zero (i.e., +0) values,each of which corresponds to a respective control period of the strokecycle. Note that the target motor speeds and motor speed adjustmentvalues discussed here with reference to the example of FIG. 3 areprovided for illustrative purposes, and are not meant to limit thepresent disclosure. Various techniques within the scope of the presentdisclosure may produce significantly different results in this regard.

In some embodiments, the RPM adjustment values are determined accordingto a pumpjack optimization algorithm implemented by the controller 128.The pumpjack optimization algorithm may include a tuning mode and amonitoring mode. While operating in the tuning mode, the algorithm maydetermine one or more RPM adjustment values that will improve fluidproduction. While operating in the monitoring mode, the algorithm maydetermine one or more RPM adjustment values that will relieve one ormore detrimental operating conditions (e.g., the onset of pump-off, highstress on the rod system, and/or high torque at the gearbox) detectedbased on sensory feedback.

As discussed above with reference to FIG. 2, the fluid production rateachieved by the pumpjack can be increased relative to a constant RPMprime mover by increasing the upstroke time, and decreasing thedownstroke time. Thus, in some examples, the pumpjack optimizationalgorithm, while operating in the tuning mode, may derive a motor speedadjustment table 304 including RPM adjustment values that decrease oneor more target motor speeds on the upstroke and increase one or moretarget motor speeds on the downstroke. In some examples, the pumpjackoptimization algorithm may be designed to increase fluid production byincreasing the pumping rate—i.e., reducing the duration of the totalstroke cycle (upstroke plus downstroke) to achieve a higher SPM level.Thus, in some examples, the algorithm may derive a motor speedadjustment table 304 including RPM adjustment values that increase thetarget motor speeds on both the upstroke and the downstroke to increasethe number of SPM. In such examples, any loss of pump efficiency and/orpump stroke length from decreasing the upstroke time is more thanovercome by the increased pumping rate, the net result of which is anincreased the fluid production rate.

In some embodiments, one or more of the RPM adjustment values isdetermined based on sensory feedback, such as may be received by thecontroller 128 from the load cell sensor 130, the crank rotation sensor132, and/or the motor shaft position sensor 134 can be used to determinesuitable RPM adjustment values. As noted above, the feedback from thecrank rotation sensor 132 and the motor shaft position sensor 134 can beused to determine the position of the polish rod 108, and feedback fromthe load cell sensor 130 is proportional to the load carried by thepolish rod 108. This position and load data can be used to construct asynthetic surface dynamometer card (e.g., using techniques described inU.S. Pat. No. 4,490,094) representative of loading at the polish rod 108during a stroke cycle. The surface dynamometer card can then betransformed using techniques known to those of skill in the art (such asdescribed in U.S. Pat. No. 3,343,409) into a downhole pump cardrepresentative of loading at the pump 110 during a stroke cycle. Thesurface dynamometer card and the downhole pump card can be used todetect or predict the conditions that are detrimental to pumpjack fluidproduction, such as the onset of pump-off, high stress on the rodsystem, and high torque at the gearbox. Thus, in some examples, thepumpjack optimization algorithm may conduct this type of analysis andappropriately respond by deriving an appropriate motor speed adjustmenttable 304 to relieve the detrimental condition by: (1) implementing alimited increment amount of one or more RPM adjustment values; (2)implementing one or more null or zero RPM adjustment values; and/or (3)implementing a decrement for one or more RPM adjustment values.

The graph 400 of FIG. 4 demonstrates how a surface dynamometer card 402and/or a downhole pump card 404 can be used to detect the onset of apump-off during a pump stroke cycle. As shown, each of the cards 402 and404 reflects a noticeable inward curvature 406 a, 406 b (sometimesreferred to as a “compression curve”) when a significant amount of gasis compressed during the upstroke. The detection of gas compression inthe downstroke means that the pump barrel is not completely filling withfluid during the upstroke. A slight compression curve (406 a) maysuggest that pump-off is imminent, and a severe compression curve (406b) may suggest that pump-off is presently occurring. Pump-off generallyoccurs when the upstroke timing is too fast, preventing the pump barrelfrom refilling to an acceptable level and causing the plunger to poundinto the fluid column on the downstroke. Pump-off may be relieved byimplementing a decrement for one or more RPM adjustment values duringthe upstroke to slow down the prime-mover RPM and increase the upstroketime. One or more increment RPM adjustment values may be used on thedownstroke to compensate for the increase in upstroke time.

The graph 500 of FIG. 5 demonstrates how a surface dynamometer card 502can be used to detect a “binding” (e.g., a point at which the sucker rodis encountering interference from pipe or casing joints within thewellbore) in the rod system during a pump stroke cycle. A binding of therod system may be exhibited on the surface dynamometer card 502 as asharp increase in rod load 504 a along the upstroke and a sharp decreasein rod load 504 b along the downstroke of the stroke cycle. Similar to afluid pounding event experienced during a pump-off condition, a rodbinding may cause damage to the rod system over time. In some examples,a rod binding may be relieved by appropriately adjusting the stroketiming of the pumpjack. For example, one or more RPM adjustment valuesmay be determined to slow down the sucker rod speed or lower itsacceleration at or near the point within the wellbore where the bindinghas occurred. Such modifications to the stroke timing may be implementedimmediately during the stroke cycle following detection or progressivelyover a serious of subsequent stroke cycles.

The graph 600 of FIG. 6 demonstrates how a surface dynamometer card 602a-d can be used to detect that the sucker rod is being subjected toloads approaching one or more to predetermined load and/or stress limitsduring a pump stroke cycle. Interpretation of the surface dynamometercard 602 a-d for rod loading may include identification of the peakmaximum rod load 604, the peak minimum rod load 606, and the difference608 between these values. The peak maximum rod load 604 is observed nearthe beginning of the upstroke. The peak maximum rod load 604 can becompared to a predetermined maximum allowable rod load to identify anexisting or imminent overloading event (see card 602 d) that may causethe rod system to experience tensile failure (e.g., fracturing). Thepeak minimum rod load 606 is observed near the beginning of thedownstroke. The peak minimum rod load 608 may be monitored with respectto the zero load level, at which point the rod system is essentially infreefall (see card 602 d), and therefore susceptible to buckling. Thedifference 608 between the peak maximum rod load 604 and the peakminimum rod load 606 is proportional to the rod fatigue stress. Fatiguefailures are progressive and begin as small stress cracks that growunder the action of cyclic stresses. Thus, the rod fatigue stress canalso be monitored with respect to a predetermined limit value.Overloading and freefall can be relieved by implementing a decrement forone or more RPM adjustment values during the upstroke and/or thedownstroke.

The graph 700 of FIG. 7 demonstrates how a surface dynamometer card 702a-c can be used to detect that the gearbox is being subjected to loadsapproaching one or more predetermined torque limits during a pump strokecycle. Interpretation of the surface dynamometer card 702 a-c forgearbox torque may include monitoring the rod load with respect to anupstroke torque limit curve 704 and a downstroke torque limit curve 706.The torque limit curves 704 and 706 represent the rod loads plotted as afunction of rod position that causes the net torque at the gearbox(which may be considered as the torque caused by the well loads actingon the polish rod discounted by the torque caused by the counterweightacting on the crank) to exceed a predetermined maximum limitOvertorquing the gearbox can be relieved by implementing a decrement forone or more RPM adjustment values during the upstroke and/or thedownstroke.

In some embodiments, the tuning mode and/or the monitoring mode of thepumpjack optimization algorithm may include an iterative process forprogressively improving pumpjack performance. In some examples, theiterative process may proceed continuously over a sequence of two ormore adjacent pump stroke cycles. So, one or more of the above..described techniques may be repeated through multiple iterations togradually increase fluid production. FIG. 8 illustrates a graph 800including a motor RPM curve 802, a rod load curve 804, and a stroketiming curve 806, which demonstrates an interactive tuning process suchas may be implemented by the pumpjack optimization algorithm. Inparticular, the graph 800 is illustrative of how the operations of apumpjack can be progressively tuned through successive adjustments ofthe motor speed profile applied to the prime mover. In Stroke Cycle 1,the prime mover is operated according to a default motor speed profilehaving constant speed. In Stroke Cycle 2, the motor speed profile isadjusted to increase and decrease motor RPM at specific points of theupstroke and downstroke. The RPM adjustments applied during Stroke Cycle2 may be derived at least partially based on sensory feedback receivedduring Stroke Cycle 1. In Stroke Cycle 3, the motor speed profile ismodified yet again based at least in part on sensory feedback receivedduring the previous stroke cycles. As discussed above, sensory feedbackcan be used to detect or predict detrimental operating conditions thatmay be relieved or inhibited by appropriate RPM adjustments in thesubsequent motor speed profile. However, sensory feedback may also beused facilitate the derivation of RPM adjustment values that are likelyto increase fluid production. For example, the surface dynamometer cardand the downhole pump card can be monitored during the tuning process toidentify specific control periods within the motor speed profile wherean appropriate RPM adjustment (e.g., a decrement or increment) is likelyto result in increased pump efficiency and/or increased pump strokelength. In some embodiments, the RPM adjustments may be determined basedon historical data from previous operations of the current pumpjack or asimilarly designed pumpjack. Such historical data may outline thegeneral profile of a previously identified high-production and stablemotor speed profile. Thus, the pumpjack optimization algorithm mayinitially implement suitable RPM adjustments to approach the historicalmotor speed profile. Deviations from the historical motor speed profilemay occur over time based on current sensory feedback.

In some embodiments, iterative tuning of the pumpjack may take placeover several stroke cycles. In some examples, RPM adjustments to themotor speed profile may be conducted in successive cycles of the tuningprocess, such as shown in the graph 800 of FIG. 8. Such RPM adjustmentsmay be relatively small (e.g., within the range of +10 RPM and −10 RPM)in some cases, so as to maintain system stability and prevent damagefrom unforeseen detrimental operating conditions. In some examples, RPMadjustments to the motor speed profile may be conducted piecemeal, withone or more intervening stroke cycles occurring therebetween. Forexample, RPM adjustments to increase fluid production may be implementedaccording to predetermined intervals (e.g., every 10 stroke cycles). Theintervening stroke cycles can be monitored to detect the onset of anypotential adverse operating conditions. In any event, the controller 128may cease the iterative tuning process when it is determined that themotor speed profile has been optimized. For example, the controller 128may determine that the motor speed profile has been optimized whensubsequent adjustments no longer provide significant improvements influid production and/or when subsequent adjustments cannot beimplemented without introducing an adverse operating condition (e.g.,when further incrementing RPM adjustments will result in overtorquing ofthe gearbox).

The graphs of FIGS. 9A-9E provide yet another illustration of aniterative tuning process that may take place over multiple cycles of apumpjack. In this example, the tuning process may be conducted accordingto the technique described above with reference to FIG. 3, where a motorspeed profile can be adjusted based on a motor speed adjustment table.Accordingly, the graph 900 a illustrates a default motor speed curve 902where the target motor speed for each control period of the cycle is setto a constant speed of 1,100 RPM. The graph 900 b illustrates a firstmotor speed adjustment curve 904 representative of a varying array ofincrement (e.g., +0 to 70), decrement (e.g., −0 to −40) and null (i.e.,+0) values, each of which corresponds to a respective control period ofthe cycle. The graph 900 c illustrates a first adjusted motor speedcurve 906 overlaying the default motor speed curve 902. As shown, thefirst adjusted motor speed curve 906 represents a varying array oftarget motor speeds, ranging from 1,060 RPM to 1,170 RPM, distributedover the respective the control periods of the cycle. As discussedabove, the first adjusted motor speed curve 906 is provided by applyingthe increment, decrement, and null values of the first motor speedadjustment curve 904 to the default motor speed curve 902. Thus, thefirst adjusted motor speed curve 906 features one or more target motorspeeds greater than the default 1,100 RPM and one or more target speedsless than the default. The graph 900 d illustrates a second motor speedadjustment curve 908 having increment and decrement values that rangebetween +25 RPM and −20 RPM. And the graph 900 e illustrates a secondadjusted motor speed curve 910 representing a varying array of targetmotor speeds ranging from 1,065 RPM to 1,191 RPM. The second adjustedmotor speed curve 910 is provided by applying the respective adjustmentvalues from the second motor speed adjustment curve 908 to the firstadjusted motor speed curve 906. Thus, the second adjusted motor speedcurve 910 is a second order iteration of the default motor speed curve902.

This iterative tuning process, while demonstrated across two pump strokecycles in this example, may be repeated any number of times to achievean optimized motor speed profile. As noted above, such adjustments ofthe motor speed profile may be conducted across successive cycles orbetween one or more intervening cycles. The first and second motor speedadjustment curves 902 and 908 may be derived according to any suitablealgorithm for improving fluid production, such as those described aboveinvolving increased pump efficiency, increased pumping rate, as well aspreventing, relieving or mitigating detrimental operating conditionsusing sensory feedback. Furthermore, a similar process may be performedto adjust the motor speed profile during a monitoring mode. For example,the controller may detect one or more detrimental operating conditionsbased on sensory feedback and derive an appropriate motor speedadjustment curve to relieve the condition. In some embodiments, after adetrimental condition detected during the monitoring mode has beenrelieved, the pumpjack controller may re-enter the tuning mode in anattempt to improve fluid production.

FIGS. 10-12 and 14 illustrate processes 1000, 1100, 1200 and 1400 foroperating a pumpjack. These processes can be implemented, for example,in connection with one or more components of the pumpjack 100,particularly the controller 128 and/or the VFD 126. Further, theoperations of the processes do not require the any particular order toachieve desirable results. In addition, other operations may beprovided, or operations may be eliminated, from the described processeswithout departing from the scope of the present disclosure.

According to the process 1000 of FIG. 10, an electric motor driving thepumpjack is operated (1002) in a first pump stroke cycle according to afirst motor speed profile. The first motor speed profile includes aplurality of target motor speeds, each of which corresponds to arespective discrete control period within the first pump stroke cycle.In some embodiments, the first motor speed profile may be apredetermined default setting (e.g., a constant RPM pattern), or analtered version of a motor speed profile utilized in a previous pumpstroke cycle. Sensory feedback is received (1004) during the first pumpcycle from one or more sensors mounted to monitor the operations of thepumpjack. The sensory feedback includes data collected during operationof the motor according to the first motor speed profile. In someembodiments, the sensory feedback may be received from one or more of aload cell sensor, a crank rotation sensor, and a motor shaft positionsensor. One or more speed adjustment values corresponding to a limitedsubset of the plurality of control periods are determined (1006) inresponse to receiving the sensory feedback, and while continuing tooperate the pumpjack. In some embodiments, the speed adjustment valuesmay be determined by constructing a data structure relating position toload with respect to the rod system of the pumpjack (e.g., a surfacedynamometer card and/or a downhole pump card), and comparing the datastructure to one or more predetermined load limits (e.g., a maximum rodload, a minimum rod load, an upstroke torque load limit, and adownstroke torque load limit) to identify an adverse operating condition(e.g., the onset of pump-off, high stress on the rod system, and hightorque at the gearbox). In some embodiments, the speed adjustment valuesmay be determined by identifying an abrupt load spike indicative of arod binding. In some embodiments, the speed adjustment values mayinclude a decrement to decrease the target motor speed at a controlperiod where an adverse operating condition is likely to reoccur, or atan earlier control period. Decreasing motor speed at or before thecontrol period where the adverse operating condition is likely toreoccur may relieve the condition. In some embodiments, the speedadjustment values may include an increment to increase the target motorspeed at a control period where an adverse operating condition is notlikely to reoccur. Increasing motor speed at a different point in thestroke cycle may increase the pumping rate, without aggravating orre-initiating the adverse operating condition. The first motor speedprofile is adjusted (1008) based on the one or more speed adjustmentvalues to provide a second motor speed profile. And the electric motoris operated (1010) over a second pump stroke cycle, which is immediatelysubsequent to the first pump stroke cycle, in accordance with the secondmotor speed profile.

According to the process 1100 or FIG. 11, an electric motor driving thepumpjack is operated (1102) according to a predetermined motor speedprofile. The motor speed profile includes a plurality of target motorspeeds, each of which corresponds to a respective control period withina stroke cycle of the pumpjack. Sensory feedback is received (1104) asthe motor is operated during the stroke cycle from one or more sensorsmounted to monitor the operations of the pumpjack (e.g., a load cellsensor, a crank rotation sensor, and/or a motor shaft position sensor).While continuing to operate (1102) the electric motor and receive (1104)sensory feedback, selected target motor speeds are incrementallyincreased (1106) over a plurality of sequential stroke cycles until anadverse operating condition (e.g., the onset of pump-off, high stress onthe rod system, and high torque at the gearbox) is detected (1108) basedon the sensory feedback. In response to detecting (1108) the adverseoperating condition, a select subset of the plurality of target motorspeeds are decreased (1110) based on a position of the detected adverseoperating condition within the stroke cycle. In some embodiments, theselect subset of the plurality of target motor speeds may include one ormore target motor speeds at or before the control where the adverseoperating condition is likely to reoccur.

According to the process 1200 of FIG. 12, an electric motor driving thepumpjack is operated (1202) according to a predetermined motor speedprofile. The motor speed profile includes a plurality of target motorspeeds corresponding to each of a plurality of discrete pump strokecycle segments (e.g., discrete control periods). Load data is received(1204) from one or more sensors (e.g., a load cell sensor) mounted tomonitor operations of the pumpjack. A pump cycle load profile is stored(1206) in computer memory and updated (1208) over a period of severalpump stroke cycles based on the received load data. And, in response todetecting (1210) that current load data has deviated from the historicalload profile by more than a predetermined deviation threshold, a subsetof the plurality of the target motor speeds are automaticallydecremented (1212). The target motor speeds to be decremented areselected based on the position of the deviating load data within thestroke cycle. The detected load data deviation may be indicative of anadverse operating conditions such as a rod binding, pump-off, highstress on the rod system, and high torque at the gearbox.

As described in detail above, the prime mover of a pumpjack may beoperated according to varying motor speed profile to improve fluidproduction and prevent or inhibit certain adverse operating conditions.The motor speed profile includes a plurality of target motor speedscorresponding to each of a plurality of discrete control periods withinthe stroke cycle. The VFD regulates the speed and torque output of thepumpjack motor by varying input frequency and voltage. In someembodiments, a controller coupled to the VFD can be configured (e.g.,appropriately programmed) to implement a dynamic torque controltechnique where the torque of the motor is adapted to meet, but notexceed (at least beyond a predetermined safety margin), the loadrequirements for operation at the prescribed motor speed for eachcontrol period of the current stroke cycle. The voltage applied createsthe potential for torque within the motor. Thus, the applied voltage maybe reduced according to a reduction in torque required by the motor. Insome examples, the voltage required may be accurately predicted andregulated based upon historical pump cycle data, allowing for preventionof stall conditions (i.e., where the motor is starved of torque) andoptimization of the efficiency of the motor by applying only the voltagerequired to deliver that torque. Accordingly, decreased energyconsumption may be achieved by using dynamic torque control. The graph1300 of FIG. 13 illustrates a dynamic motor torque curve 1302 and amotor voltage curve 1304 applied to provide the required torque at eachpoint in the stroke cycle.

According to the process 1400 of FIG. 14, an electric motor driving thepumpjack is operated (1402) according to a varying motor speed profile.The motor speed profile includes a plurality of target motor speedscorresponding to each of a plurality of discrete pump stroke cyclesegments (e.g., discrete control periods). Load data is received (1404)from one or more sensors (e.g., a load cell sensor) mounted to monitoroperations of the pumpjack. A pump cycle load profile is stored (1406)in computer memory based on the received load data. A varying voltageprofile is automatically determined (1408) to drive the electric motoraccording to the plurality of target motor speeds and the pump cycleload profile. And the varying voltage profile is subsequently applied(1410) to the motor. Further, in some embodiments, a dynamic torquecontrol technique may be conducted predictively on a cycle-by-cyclebases. That is, the pump cycle load profile (e.g., the dynamic motortorque curve) can be mathematically predicted based on an altered motorspeed profile to be implemented during the upcoming pump stroke cycle.The predicted pump cycle load profile can then be used to determine apredicted varying voltage profile. The altered motor speed profile andthe predicted varying voltage profile can be simultaneously implementedduring the next pump stroke cycle. This predictive technique wouldnormally be dangerous to implement in a highly variable torqueenvironment, because a large increase in the torque requirement on themotor cannot be predicted by a conventional control system. However, inone or more embodiments of the present disclosure, the pump cycle loadprofile can be accurately determined (e.g., mathematically predicted)based at least in part on historical sensory feedback data and/oradjustments between the current motor speed profile and one or morestroke timing curves implemented during one or more previous cycles.

The graph 1500 of FIG. 15 demonstrates how a surface dynamometer card1502 a can be adjusted over one or more pump stroke cycles to increasefluid production while avoiding the predetermined gearbox torque limits1504 and 1506. As discussed above with reference to FIG. 7, overtorquingthe gearbox can be prevented or relieved by implementing a decrement forone or more RPM adjustment values during the upstroke and/or thedownstroke. However, decreasing the motor RPM to remedy or preventdamage to the gearbox can have a detrimental effect on the fluidproduction rate. Thus, in order to maintain (or even increase) the rateof fluid production, one or more increments RPM adjustment values may beimplemented at other regions of the stroke cycle that are notstructurally limited by the torque limits. The surface dynamometer card1502 b illustrates two regions of the stroke cycle 1508 a, 1508 b wherethe motor RPM is decreased to avoid the torque limits, and two otherregions 1508 c, 1508 d where the motor RPM is increased to make up forthe motor speed decrease. In this way, the stroke cycle can be furtheroptimized via a strategically alteration of the surface dynamometer cardto effectively redistribute the gearbox torque. Similar techniques foraltering the surface dynamometer card can be implemented with respect tothe peak maximum and peak minimum rod loads described above withreference to FIG. 6 and/or the detection of a rod binding describedabove with reference to FIG. 5, with the effect of preventing or curinga rod stress condition while increasing fluid production.

A number of embodiments of the invention have been described.Nevertheless, it will be understood that various modifications may bemade without departing from the spirit and scope of the inventions.

What is claimed is:
 1. A pumpjack motor system, comprising: an electricmotor coupled to a gear box of a pumpjack; one or more sensors mountedto monitor at least one operating condition of the pumpjack duringoperation of the motor; and a drive controller coupled to the motor andoperable to control the motor in accordance with a varying motor speedprofile over a pumping cycle of the pumpjack, while applying voltage tothe motor; wherein the drive controller is configured to determine,based on sensory feedback from the one or more sensors, a pumping cycleload profile; automatically determine, based on the pumping cycle loadprofile, a varying voltage profile; and to control the motor inaccordance with the varying motor speed profile while applying thevarying voltage profile to the motor.
 2. The pumpjack motor system ofclaim 1, wherein the varying motor speed profile comprises an alteredversion of a stroke timing curve implemented during one or more previouspumping cycles of the pumpjack.
 3. The pumpjack motor system of claim 1,wherein the varying motor speed profile comprises a plurality of targetmotor speeds corresponding to each of a plurality of discrete controlperiods within the pumping cycle of the pump jack.
 4. The pumpjack motorsystem of claim 3, wherein the pumping cycle load profile comprises aplurality of torque loads corresponding to each of the plurality ofdiscrete control periods.
 5. The pumpjack motor system of claim 3,wherein the plurality of discrete control periods comprises at least 100control periods.
 6. The pumpjack motor system of claim 3, wherein one ormore of the plurality of discrete control periods of the first pumpstroke cycle has a time duration of between about 5 and 100milliseconds.
 7. The pumpjack motor system of claim 1, wherein the drivecontroller is configured to determine the pumping cycle load profile asa mathematical prediction based on: historical sensory feedback providedby the one or more sensors during one or more previous pumping cycles ofthe pumpjack; and/or adjustments between the varying motor speed profileand a stroke timing curve implemented during one or more previouspumping cycles of the pumpjack.
 8. The pumpjack motor system of a claim1, wherein at least one of the sensors comprises a load sensor.
 9. Thepumpjack motor system of claim 8, wherein the load sensor is responsiveto load of a polish rod of the pumpjack.
 10. The pumpjack motor systemof claim 1, wherein at least one of the sensors comprises a crankrotation sensor.
 11. The pumpjack motor system of claim 1, wherein atleast one of the sensors comprises a motor shaft position sensor. 12.The pumpjack motor system of claim 1, wherein at least one of thesensors comprises a motor current sensor.
 13. A method of operating apumpjack, comprising: operating an electric motor driving the pumpjackaccording to a varying motor speed profile during a first pump strokecycle of the pumpjack, the motor speed profile comprising a plurality oftarget motor speeds corresponding to each of a plurality of discretecontrol periods; receiving sensory feedback from one or more sensorsmounted to monitor at least one operating condition of the pumpjack, thesensory feedback comprising data collected during the first pump strokecycle; determining a pump cycle load profile based on the sensoryfeedback, the pump cycle load profile corresponding to a plurality oftorque loads of the electric motor at each of the discrete controlperiods of the first pump stroke cycle; automatically determining, basedon the pump cycle load profile, a varying voltage profile; and operatingthe electric motor according to the varying motor speed profile and thevarying voltage profile during a second pump stroke cycle of thepumpjack.
 14. The method of claim 13, wherein the varying motor speedprofile comprises an altered version of a stroke timing curveimplemented during one or more previous pumping cycles of the pumpjack.15. The method of claim 13, wherein the plurality of discrete controlperiods comprises at least 100 control periods.
 16. The method of claim13, wherein at least one of the plurality of discrete control periods ofthe first pump stroke cycle has a time duration of between about 5 and100 milliseconds.
 17. The method of claim 13, wherein determining thepump cycle load profile comprises implementing a mathematical predictionalgorithm based on: historical sensory feedback provided by the one ormore sensors during one or more previous pumping cycles of the pumpjack;and/or adjustments between the varying motor speed profile and one ormore stroke timing curves implemented during one or more previouspumping cycles of the pumpjack.
 18. The method of claim 13, wherein atleast one of the sensors comprises a load sensor.
 19. The method ofclaim 18, wherein the load sensor is responsive to load of a polish rodof the pumpjack.
 20. The method of claim 13, wherein at least one of thesensors comprises a crank rotation sensor.
 21. The method of claim 13,wherein at least one of the sensors comprises a motor shaft positionsensor.
 22. The method of claim 13, wherein at least one of the sensorscomprises a motor current sensor.